<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>标准分析器 | Elasticsearch: 权威指南 | Elastic</title>
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
</head>
<body>
<div class="main-container">
    <section id="content">
        
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原文地址: <a href="https://www.elastic.co/guide/cn/elasticsearch/guide/current/standard-analyzer.html" rel="nofollow">https://www.elastic.co/guide/cn/elasticsearch/guide/current/standard-analyzer.html</a>, 版权归 www.elastic.co 所有<br/>
                            英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/standard-analyzer.html" rel="nofollow">https://www.elastic.co/guide/en/elasticsearch/guide/current/standard-analyzer.html</a>
                            </div>
                        <!-- start body -->
                  <div class="page_header">
<b>请注意:</b><br>本书基于 Elasticsearch 2.x 版本，有些内容可能已经过时。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch: 权威指南</a></span>
»
<span class="breadcrumb-link"><a href="languages.html">处理人类语言</a></span>
»
<span class="breadcrumb-link"><a href="identifying-words.html">词汇识别</a></span>
»
<span class="breadcrumb-node">标准分析器</span>
</div>
<div class="navheader">
<span class="prev">
<a href="identifying-words.html">« 词汇识别</a>
</span>
<span class="next">
<a href="standard-tokenizer.html">标准分词器 »</a>
</span>
</div>
<div class="section">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="standard-analyzer"></a>标准分析器<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elasticsearch-cn/elasticsearch-definitive-guide/edit/cn/210_Identifying_words/10_Standard_analyzer.asciidoc">edit</a>
</h2>
</div></div></div>
<p>任何全文检索的字符串域都默认使用 <code class="literal">standard</code> 分析器。
如果我们想要一个 <a class="xref" href="custom-analyzers.html" title="自定义分析器"><code class="literal">自定义</code> 分析器</a> ，可以按照如下定义方式重新实现 <code class="literal">标准</code> 分析器：</p>
<div class="pre_wrapper lang-js pagebreak-before">
<pre class="programlisting prettyprint lang-js pagebreak-before">{
    "type":      "custom",
    "tokenizer": "standard",
    "filter":  [ "lowercase", "stop" ]
}</pre>
</div>
<p>在 <a class="xref" href="token-normalization.html" title="归一化词元"><em>归一化词元</em></a> （标准化词汇单元）和 <a class="xref" href="stopwords.html" title="停用词: 性能与精度"><em>停用词: 性能与精度</em></a> （停用词）中，我们讨论了 <code class="literal">lowercase</code> （小写字母）和 <code class="literal">stop</code> （停用词） <em>词汇单元过滤器</em> ，但是现在，我们专注于 <code class="literal">standard</code> <em>tokenizer</em> （标准分词器）。</p>
</div>
<div class="navfooter">
<span class="prev">
<a href="identifying-words.html">« 词汇识别</a>
</span>
<span class="next">
<a href="standard-tokenizer.html">标准分词器 »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>